package com.sky.task;

import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
@Slf4j
@Component
public class TaskTest {
    static int count;
    //@Scheduled(cron = "0/5 1-2 * * * ?")
    //任意年月日中第一到第二分钟内每五秒执行一次
    public void showHello(){
        count++;
        log.info("定时任务开启第{}次",count);
    }
}
